import request from '@/utils/request'

// 查询topics列表
export function getTopics() {
  return request({
    url: '/system/mqtt/getTopics',
    method: 'get'
  })
}

// 动态增加topic
export function addTopic(data) {
  return request({
    url: '/system/mqtt/addTopic',
    method: 'post',
    data: data
  })
}

// 删除topic
export function removeTopic(data) {
  return request({
    url: '/system/mqtt/removeTopic',
    method: 'post',
    data: data
  })
}


// 发送消息
export function sendMsgToTopic(data) {
  return request({
    url: '/system/mqtt/sendMsgToTopic',
    method: 'post',
    data: data
  })
}